package _租车系统;

public class PassengerCar extends Car {
    public PassengerCar() {
    }

    public PassengerCar(String chepai, String pinpai, int zujin, int zuowei, int day, double feiyong, boolean state) {
        super(chepai,  pinpai, zujin, zuowei, day, feiyong, state);
    }

    @Override
    public double feiyong() {
        if (day>160){
            return day*zujin*0.8;
        }else if (day>30){
            return day * zujin * 0.85;
        }
        return super.feiyong();
    }
}
